-
Notifications
You must be signed in to change notification settings - Fork 13.9k
rustc_codegen_llvm: Tidying of update_target_reliable_float_cfg
#146747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
|
Sorry, it seems this function has more problems than it looks and re-investigating now. |
d1c55e3 to
924c9bc
Compare
This comment has been minimized.
This comment has been minimized.
924c9bc to
5ae61db
Compare
|
Re-investigation complete. |
... in `update_target_reliable_float_cfg`, based on the actual changes. The AArch64 issue is fixed on LLVM 20.1.1 while the MIPS issue is fixed on LLVM 20.1.0 (the first LLVM 20 release). This commit distinguishes two separate cases.
This commit simplifies floating type handling through
`update_target_reliable_float_cfg` based on several facts:
1. Major changes in behavior normally occurs only
on the major LLVM upgrade.
2. The first release of LLVM 20.x.x is 20.1.0.
Due to the first fact, we can normally ignore minor and patch releases
of LLVM and we can remove obscure variables like `lt_xx_x_x` (still,
there is a case where checking for patch version is required).
The second fact is missed when the minimum LLVM version is raised to
LLVM 20 and one "fixed in LLVM 20" case can be safely removed.
…cfg` This commit reorders certain match clauses in `update_target_reliable_float_cfg` by the architecture when there's no problems reordering it.
5ae61db to
de33db2
Compare
|
☔ The latest upstream changes (presumably #147645) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR simplifies floating type handling through
update_target_reliable_float_cfgbased on several facts:Due to the first fact, we can normally ignore minor and patch releases of LLVM and we can remove obscure variables like
lt_xx_x_x.The second fact is missed when the minimum LLVM version is raised to LLVM 20 (cf. #145071) and one "fixed in LLVM 20" case can be safely removed (another cannot be removed since it's fixed on LLVM 20.1.1).
It also reorders certain
matchclauses by the architecture when there's no problems reordering it.Note that, an LLVM issue on MIPS is fixed on LLVM 20.1.0 and another on AArch64 is fixed on LLVM 20.1.1.
Originally, they are both considered fixed on LLVM 20.1.1 but the author separated them into two cases (so that the MIPS bug checking can be removed).
Related: #146615 (uses similar method to extract LLVM version)
Related: #145071 (follow-up of the minimum LLVM version upgrade to LLVM 20)
r? @workingjubilee